package online.lmds.sdmanage.main.message;

import online.lmds.sdmanage.main.message.entity.MqttLog;

/**
 * Created by Brighten Ma on 2017/5/1.
 */
public class MqttMsgBuilder {

    private MqttLog mqttLog;

    public MqttMsgBuilder() {
        mqttLog = new MqttLog();
    }

    public MqttMsgBuilder(MqttLog mqttLog) {
        this.mqttLog = mqttLog;
    }

    public MqttMsgBuilder setMsgType(int type){
        mqttLog.setMsgType(type);
        return this;
    }

    public MqttMsgBuilder setFromId(String uid){
        mqttLog.setFromId(uid);
        return this;
    }

    public MqttMsgBuilder setDeviceId(String uid){
        mqttLog.setDeviceId(uid);
        return this;
    }

    public MqttMsgBuilder setDeviceType(String type){
        mqttLog.setDeviceType(type);
        return this;
    }

    public MqttMsgBuilder setTopic(String topic){
        mqttLog.setTopic(topic);
        return this;
    }

}
